package com.example.demo.mapper;


import java.util.List;
import java.util.Set;

import com.example.demo.entity.User;
import com.example.demo.entity.UserAndRole;

/**
 * user映射类
 * @author Henry.Y
 * 2019年5月20日
 */
public interface UserMapper {

	public int createUser(String sqlId,User user);
	
	public int deleteUser(String sqlId,String id);
	
	public void updatePassword(String sqlId,User user);
	
	public int correlateRoles(String sqlId,List<UserAndRole> userAndRoleList);
	
	public int uncorrelateRoles(String sqlId,UserAndRole userAndRole);
	
	public User findOne(String sqlId,String id);
	
	public User findUserByUsername(String sqlId,String username);
	
	public Set<String> findRoles(String sqlId,String username);
	
	public Set<String> findPermissions(String sqlId,String username);
	
	public int deleteUserTable(String sqlId);
}
